Skip to content

chore(cloud-agent): extract shared utilities for cloud attachments#1514

Merged
tatoalo merged 1 commit intomainfrom
chore/cloud-agent/shared-utils
Apr 9, 2026
Merged

chore(cloud-agent): extract shared utilities for cloud attachments#1514
tatoalo merged 1 commit intomainfrom
chore/cloud-agent/shared-utils

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented Apr 7, 2026

ph_code_cloud_attachments.mp4 (uploaded via Graphite)

Problem

Cloud attachments feature needs shared utilities across multiple modules

Changes

  • Extract escapeXmlAttr/unescapeXmlAttr into xml.ts (was duplicated in 3 files)
  • Extract getFileName/getFileExtension
  • Extract extractPromptDisplayContent, makeAttachmentUri, parseAttachmentUri
  • Move cloud prompt codec (serializeCloudPrompt, deserializeCloudPrompt) into @posthog/shared
  • Fix mid-file import in content.ts

How did you test this?

Unit tests for cloud prompt codec and prompt content extraction

Copy link
Copy Markdown
Contributor Author

tatoalo commented Apr 7, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@tatoalo tatoalo force-pushed the chore/cloud-agent/shared-utils branch from 1f6632a to 295c41d Compare April 9, 2026 08:13
Copy link
Copy Markdown
Contributor

@jonathanlab jonathanlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

@tatoalo tatoalo merged commit 7f42dc5 into main Apr 9, 2026
16 checks passed
@tatoalo tatoalo deleted the chore/cloud-agent/shared-utils branch April 9, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants